import { defineFakeRoute } from "vite-plugin-fake-server/client";
// 模拟刷新token接口
// export default 
defineFakeRoute([
    {
        url: "/business/project/facilit/v2/facilits",
        method: "get",
        response: () => {
            return {
                "code": 200,
                "msg": "ok",
                "result": {
                    "data": [{
                        "id": 1,
                        "facilitName": "333",
                        "facilitSN": "333",
                        "buildingName": "333",
                        "groupName": "333",
                        "createdAt": "333"
                    }],
                    "total": 1
                }
            }
        }
    }, {
        url: "/business/project/facilit/v2/facilit",
        method: "get",
        response: () => {
            return {
                "code": 200,
                "msg": "ok",
                "result": {
                    "id": 1,
                    "projectId": 0,
                    "facilitName": "",
                    "groupId": 0,
                    "position": 0,
                    "buildingId": 0,
                    "drawingId": 0,
                    "drawingPoints": {
                        "lat": "",
                        "lng": "",
                        "iconUrl": ""
                    },
                    "mapPoints": {
                        "lat": "",
                        "lng": "",
                        "iconUrl": ""
                    },
                    "faciltSN": "",
                    "faciltType": "",
                    "dutyUid": 0,
                    "outDate": "",
                    "expireDate": "",
                    "fixDate": "",
                    "scrapDate": "",
                    "mainteDate": "",
                    "mainteCycle": 0,
                    "cycleValue": 0,
                    "isInspection": 0,
                    "NFC": "",
                    "inspect": 0,
                    "inspectContent": "",
                    "facilitImg": []
                }
            }
        }
    }, {
        url: "/business/project/facilit/v2/facilit",
        method: "delete",
        response: () => {
            return {
                "code": 200,
                "msg": "删除成功",
                "result": null
            }
        }
    }, {
        url: "/business/project/facilit/v2/facilit",
        method: "put",
        response: () => {
            return {
                "code": 200,
                "msg": "修改成功",
                "result": null
            }
        }
    }, {
        url: "/business/project/facilit/v2/facilit",
        method: "post",
        response: () => {
            return {
                "code": 200,
                "msg": "添加成功",
                "result": null
            }
        }
    },
    , {
        url: "/business/project/facilit/v2/buildings",
        method: "get",
        response: () => {
            return {
                "code": 200,
                "msg": null,
                "result": {
                    "prodcutId": 1,
                    "buildingInfo": [
                        {
                            "buildingId": 1,
                            "buildingName": "测试",
                            "children": [
                                {
                                    "drawingId": 1,
                                    "drwaingName": "F1"
                                },
                                {
                                    "drawingId": 2,
                                    "drwaingName": "F2"
                                },
                                {
                                    "drawingId": 3,
                                    "drwaingName": "F3"
                                }

                            ]
                        },
                        {
                            "buildingId": 2,
                            "buildingName": "学校",
                            "children": [{
                                "drawingId": 2,
                                "drwaingName": "F2"
                            },

                            ]
                        }, 
                        {
                            "buildingId": 3,
                            "buildingName": "哈哈哈",
                            "children": [{
                                "drawingId": 3,
                                "drwaingName": "F4"
                            }]
                        }]
                }
            
            }
        }
    },
]);